﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ctlContractSideList_OLD.ascx.cs" Inherits="Ctl_ctlSideList" %>
<%@ Register Assembly="UIControls" Namespace="UIControls" TagPrefix="cc1" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="cc2" %>
<%@ Register src="ctlNewSideContract.ascx" tagname="ctlNewSideContract" tagprefix="uc1" %>
<%@ Register src="ctlContractSheduleSideList.ascx" tagname="ctlContractSheduleSideList" tagprefix="uc2" %>
<%@ Register src="ctlSideListSelector.ascx" tagname="ctlSideListSelector" tagprefix="uc3" %>
<script type="text/javascript">
    function OnMethodSucceeded(result, eventArgs) {
        alert('Привет');
        
    }

    function OnMethodFailed(error) {
        alert(error.get_message());
    }
    

</script>
<asp:UpdatePanel ID="updLvSideList" runat="server">
<ContentTemplate >
    <table width ="100%" cellpadding ="3" cellspacing ="0">
<asp:ListView ID="lvSideList" runat="server" onitemcommand="ItemCommand" 
        onitemediting="ItemEditing" onitemupdating="ItemUpdating">
        <LayoutTemplate>            
         <tr>
            <td class ="grd_td_item_caption" >
                <table width ="100%" cellpadding  ="3" cellspacing ="0" >
                            <tr >
                                 <td style="width :40px;text-align :center" >           
                                     &nbsp
                                </td>                                
                                 <td style="width: 150px">
                                    &nbsp
                                </td>
                                 <td  style="width :350px">
                                    Тип носителя
                                </td>                                                
                                 <td  style="width :32%">
                                    Адрес
                                </td>     
                                <td  >
                                    &nbsp
                                 </td> 
                                 <td  style="width :80px">
                                    Начало
                                </td>            
                                 <td style="width :80px" >
                                    Окончание
                                 </td> 
                                 <td style="width :80px" >
                                     Цена
                                 </td>                                
                                 <td style="width :80px" >
                                     Сумма
                                 </td>                                         
                                 <td style="width :40px;text-align :center" >           
                                    &nbsp
                                </td>                                
                              </tr>    
                        </table>
            </td>
         </tr>
        <tr ID="itemPlaceholder" runat="server">                                                        
        </tr>        
        </LayoutTemplate>
                 <ItemTemplate >
            <tr>              
                <td class ="grd_td_item" onmouseover ="GrdItemOnMouseOver(this);" onmouseout ="GrdItemOnMouseOut(this);"   >                    
                        <table width ="100%" cellpadding  ="3" cellspacing ="0" >
                            <tr >
                                 <td style="width :40px;text-align :center" >           
                                    <asp:ImageButton ID="bntShow_Q" Visible=<%# ((bool)Eval("ItemIn_Q")) %>  OnClick ="bntShow_Q_Click" ImageUrl ="~/images/Q.png" runat="server" />                                     
                                </td>                                
                                 <td style="width: 150px">
                                    <%# GetConstractionDescribe((OutdoorLib.BaseEntity.Constraction.Side)Eval("Side")).Number + ((OutdoorLib.BaseEntity.Constraction.Side)Eval("Side")).Litera %>
                                </td>
                                 <td  style="width :350px">
                                    <%# GetConstractionDescribe((OutdoorLib.BaseEntity.Constraction.Side)Eval ("Side")).ConstractionTypeAsString   %>
                                </td>                                                
                                 <td  style="width :32%">
                                    <%# GetConstractionDescribe((OutdoorLib.BaseEntity.Constraction.Side)Eval ("Side")).FullAdress %>
                                </td>     
                                 <td >
                                    &nbsp
                                 </td> 
                                 <td  style="width :80px">
                                    <%# ((DateTime )Eval ("dtStart")).ToShortDateString () %>
                                </td>            
                                 <td style="width :80px" >
                                    <%# ((DateTime )Eval ("dtFinish")).ToShortDateString () %>
                                 </td> 
                                 <td style="width :80px" >
                                     <%# (Eval ("Price")) %>
                                 </td>                                
                                 <td style="width :80px" >
                                     <%# (Eval ("Summa")) %>
                                 </td>                                         
                                 <td style="width :40px;text-align :center" >           
                                    <asp:ImageButton ID="btnEdit" CommandName ="Edit" ImageUrl="~/images/icon-edit.gif" runat="server" />
                                </td>                                
                                 
                              </tr>    
                        </table>
                </td> 
            </tr>        
        </ItemTemplate>
        <EditItemTemplate >

 <tr>              
                <td class ="grd_td_item" onmouseover ="GrdItemOnMouseOver(this);" onmouseout ="GrdItemOnMouseOut(this);"   >                    
                        <table width ="100%" cellpadding  ="3" cellspacing ="0" >
                            <tr >
                                 <td style="width :40px;text-align :center" >           
                                    &nbsp
                                    <asp:HiddenField ID="hfCurrentID" Value =<%# (Eval ("ID").ToString())%> runat="server" />
                                </td>                                
                                 <td style="width: 150px">
                                    <%# GetConstractionDescribe((OutdoorLib.BaseEntity.Constraction.Side)Eval("Side")).Number + ((OutdoorLib.BaseEntity.Constraction.Side)Eval("Side")).Litera%>
                                </td>
                                 <td  style="width :350px">
                                    <%# GetConstractionDescribe((OutdoorLib.BaseEntity.Constraction.Side)Eval ("Side")).ConstractionTypeAsString   %>
                                </td>                                                
                                 <td  style="width :32%">
                                    <%# GetConstractionDescribe((OutdoorLib.BaseEntity.Constraction.Side)Eval ("Side")).FullAdress %>
                                </td>     
                                 <td >
                                    &nbsp
                                 </td> 
                                 <td  >
                                     <cc1:TextBox_Date ID="txtDtStart" Width ="80px" CssClass ="TextBox" Text = <%# ((DateTime )Eval ("dtStart")).ToShortDateString () %> runat="server"></cc1:TextBox_Date>                                    
                                     <cc2:CalendarExtender Format="dd.MM.yyyy" ID="CalendarExtender1" runat="server" 
                                                    Enabled="True" TargetControlID="txtDtStart">
                                    </cc2:CalendarExtender>
                                 </td>                                
                                 <td >
                                    <cc1:TextBox_Date ID="txtDtFinish" Width ="80px" CssClass ="TextBox" Text = <%# ((DateTime )Eval ("dtFinish")).ToShortDateString () %> runat="server"></cc1:TextBox_Date>                                    
                                    <cc2:CalendarExtender Format="dd.MM.yyyy" ID="txt_dtCreate_CalendarExtender" runat="server" 
                                                    Enabled="True" TargetControlID="txtDtFinish">
                                    </cc2:CalendarExtender></td>                                 
                                 <td >
                                     <asp:TextBox ID="txtPrice" Width ="80px" runat="server" Text =<%# (Eval ("Price")) %> ></asp:TextBox>                                     
                                 </td>                                
                                 <td style="text-align :left"  >
                                     <asp:ImageButton ID="btnPriceCalculator" OnClick ="btnPriceCalculatorClick" ImageUrl="~/images/icon-calendar.gif" runat="server" />                                     
                                 </td>                                         
                                 <td style="width :40px;text-align :center" >           
                                     <asp:ImageButton ID="btnUpdate" CommandName ="Update" ImageUrl="~/images/icon-save.gif" runat="server" />
                                </td>                                                                
                            </tr>    
                        </table> 
                 </td> 
</EditItemTemplate>

</asp:ListView>
</table>
</ContentTemplate>
</asp:UpdatePanel>




<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate >
<asp:Panel ID="pnlCalculator" runat="server"  BackColor ="White" Width   ="600px" Height ="200px" CssClass ="TextBox">
    <table style="width:100%;" cellpadding ="3" cellspacing ="0">
    <tr>
        <td  style ="font-weight :bold " class ="grd_td_head"    >
            Каркулятор - стоимость стороны</td>
        <td style ="width :20px ; text-align :right " class ="grd_td_head"  >
            <asp:ImageButton ID="btnClose" runat="server"  ImageUrl="~/images/close.gif" 
                Width="16px" onclick="btnClose_Click" />
        </td>
    </tr>       
    </table>        
        <table style="width: 100%;background-color:White  ">
            <tr >
            <td  class ="grd_td_item_caption" >
                Сторона:                                
                </td>
            <td  class ="grd_td_item" >
                001А</td>
                <td class="grd_td_item" width="20%">
                    &nbsp;</td>
            </tr>            
            <tr >
            <td  class ="grd_td_item_caption" >
                Базовая (руб./сутки):                                
                </td>
            <td  class ="grd_td_item" style="height: 25px" >
                &nbsp;</td>
                <td class="grd_td_item" style="height: 25px; text-align: right;" width="20%">
                    250 руб.</td>
            </tr>            
            <tr>
                <td class="grd_td_item_caption" >
                    Скидки -клиент</td>
                <td class="grd_td_item" colspan="2" style="height: 25px">
                    <table style="width:100%;">
                        <tr>
                            <td>
                                <asp:CheckBox ID="CheckBox1" runat="server" />
                            </td>
                            <td>
                                Постоянный клиент(02.10-02.11)
                            </td>
                            <td>
                                0,5 %</td>
                            <td>
                                15 руб.</td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr>
                <td class="grd_td_item_caption" >
                    Скидки -поверхность</td>
                <td class="grd_td_item" colspan="2" style="height: 25px">
                    <table style="width:100%;">
                        <tr>
                            <td>
                                <asp:CheckBox ID="CheckBox2" runat="server" />
                            </td>
                            <td>
                                неликвид стороны А (05.10-07.11)</td>
                            <td>
                                1 %</td>
                            <td>
                                25 руб.</td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr >
            <td  class ="grd_td_item_caption" >
                Рекомендуемая цена:</td>
            <td  class ="grd_td_item" >
                &nbsp;</td>
                <td class="grd_td_item" width="20%" style ="text-align :right">
                    <asp:TextBox ID="txtRecomendetedPrice" runat="server" CssClass="TextBox" 
                        Width="100px"></asp:TextBox>
                </td>
            </tr>            
            <tr >
            <td >
                &nbsp </td>
            <td  style ="text-align :left  "  >
                31*250=7500</td>
                <td style="text-align :right " width="20%">
                    <asp:Button ID="btnConfirmRecomendetedPrice" runat="server" Text="Принять" Width="100px" 
                        onclick="btnConfirmRecomendetedPrice_Click" />
                </td>
            </tr>
        </table>
    </asp:Panel>
<asp:LinkButton ID="proxyBtnClose_popSidePriceCalculator" runat="server"></asp:LinkButton>
<cc2:ModalPopupExtender ID="popSidePriceCalculator" runat="server" 
    BackgroundCssClass="PopupWindowBackGround" CancelControlID="proxyBtnClose_popSidePriceCalculator" 
    DropShadow="False" OkControlID="proxyBtnClose_popSidePriceCalculator" PopupControlID="pnlCalculator" 
    PopupDragHandleControlID="pnlCalculator" TargetControlID="proxyBtnClose_popSidePriceCalculator">
</cc2:ModalPopupExtender>
</ContentTemplate> 
</asp:UpdatePanel> 

<asp:UpdatePanel ID="UpdatePanel3" runat="server">
<ContentTemplate >
<asp:Button ID="btnAddRecord"  CssClass ="btn" runat="server" Text="Добавить сторону" />
<asp:Panel ID="pnlAddRecord" runat="server"  BackColor ="White" Width   ="700px" Height ="500px" CssClass ="TextBox">
 <table style="width:100%;" cellpadding ="3" cellspacing ="0">
    <tr>
        <td  style ="font-weight :bold " class ="grd_td_head"    >
            Добавить сторону </td>
        <td style ="width :20px ; text-align :right " class ="grd_td_head"  >
            <asp:ImageButton ID="btnClose_Q" runat="server"  ImageUrl="~/images/close.gif" 
                Width="16px"  />
        </td>
    </tr>       
    </table>        
    <asp:LinkButton ID="proxy_pnlAddRecord" runat="server"></asp:LinkButton>
    <asp:UpdatePanel ID="UpdatePanel4" runat="server">
    <ContentTemplate >            
        <asp:Button ID="Button1" runat="server" Text="Button" />
    </ContentTemplate> 
    </asp:UpdatePanel>

    
    <cc2:ModalPopupExtender ID="PopPnlAddRecord" runat="server" 
    BackgroundCssClass="PopupWindowBackGround" CancelControlID="btnClose_Q" 
    DropShadow="False" OkControlID="btnClose_Q" PopupControlID="pnlAddRecord" 
    PopupDragHandleControlID="proxy_pnlAddRecord" TargetControlID="btnAddRecord">
</cc2:ModalPopupExtender>    
</asp:Panel> 
</ContentTemplate> 
</asp:UpdatePanel>

<asp:UpdatePanel ID="UpdatePanel2" runat="server">
<ContentTemplate >
<asp:Panel ID="pnlQ" runat="server"  BackColor ="White" Width   ="600px" Height ="200px" CssClass ="TextBox">
 <table style="width:100%;" cellpadding ="3" cellspacing ="0">
    <tr>
        <td  style ="font-weight :bold " class ="grd_td_head"    >
            Очередь стороны </td>
        <td style ="width :20px ; text-align :right " class ="grd_td_head"  >
            <asp:ImageButton ID="ImageButton1" runat="server"  ImageUrl="~/images/close.gif" 
                Width="16px" onclick="ImageButton1_Click"  />
        </td>
    </tr>       
    </table>  
    <asp:UpdatePanel ID="UpdatePanel5" runat="server"  >
    <ContentTemplate >            
        <asp:Button ID="Button2" runat="server" Text="Button" />
    </ContentTemplate> 
    </asp:UpdatePanel>      
    <asp:LinkButton ID="proxy_Pop_pnlQ" runat="server"></asp:LinkButton>
    <cc2:ModalPopupExtender ID="Pop_pnlQ" runat="server" 
    BackgroundCssClass="PopupWindowBackGround" CancelControlID="proxy_Pop_pnlQ" 
    DropShadow="False" OkControlID="proxy_Pop_pnlQ" PopupControlID="pnlQ" 
    PopupDragHandleControlID="pnlQ" TargetControlID="proxy_Pop_pnlQ">
</cc2:ModalPopupExtender>

   
</asp:Panel> 
</ContentTemplate> 
</asp:UpdatePanel> 



 


